Package com.cisco.pt.ipc.sim
Interface DNSClient
- All Known Implementing Classes:
DNSClientImpl
Information provided by the PKI file:
\class DnsClient
\brief DnsClient is the process that handles retrieving DNS lookups.
\example network().getDevice("PC0").getProcess("DnsClient")
- Author:
- Auto-generated
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddIpAddress(String hostname, IPAddress ipAddress) Information provided by the PKI file:getHostAt(int index) Information provided by the PKI file:getIpOfHost(String hostname) Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:intInformation provided by the PKI file:booleanInformation provided by the PKI file:booleanisHostNameExisted(String hostname) Information provided by the PKI file:booleanisIpExisted(String hostname, IPAddress ipAddress) Information provided by the PKI file:booleanisValidName(String hostname) Information provided by the PKI file:voidInformation provided by the PKI file:voidremoveIpAddress(String hostname) Information provided by the PKI file:voidsetEnabled(boolean bEnable) Information provided by the PKI file:voidsetServerIp(IPAddress ipAddress) Information provided by the PKI file:voidsetServerIpv6(IPV6Address ipAddress) Information provided by the PKI file:Methods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSessionMethods inherited from interface com.cisco.pt.ipc.sim.Process
getOwnerDevice
-
Method Details
-
addIpAddress
Information provided by the PKI file:
\brief Adds a DNS entry with the specified hostname and IP address to the DNS table. \param hostname, the hostname of the node. \param ipAddress, the IP address of the node. \return bool, true if successful, otherwise false.- Parameters:
hostname- Takes in a parameter of hostnameipAddress- Takes in a parameter of ipAddress- Returns:
- boolean Returns a boolean
-
removeIpAddress
Information provided by the PKI file:
\brief Removes the DNS entry from the table based on the hostname. \param hostname, the hostname associated with the IP address to remove.- Parameters:
hostname- Takes in a parameter of hostname
-
removeIp
Information provided by the PKI file:
\brief Removes the DNS entry from the table based on the hostname and the IP address. \param hostname, the hostname of the node. \param ipAddress, the IP address of the node.- Parameters:
hostname- Takes in a parameter of hostnameipAddress- Takes in a parameter of ipAddress
-
isValidName
Information provided by the PKI file:
Returns true if the hostname is a valid name (non-special characters), otherwise false. \param hostname, the hostname of interest. \return bool, true if the hostname is a valid name (non-special characters), otherwise false.- Parameters:
hostname- Takes in a parameter of hostname- Returns:
- boolean Returns a boolean
-
setServerIp
Information provided by the PKI file:
\brief Sets the IP address of the DNS server. \param ipAddress, the DNS server IP address.- Parameters:
ipAddress- Takes in a parameter of ipAddress
-
getServerIp
IPAddress getServerIp()Information provided by the PKI file:
\brief Returns the IP address of the DNS server. \return ip, the DNS server ip address.- Returns:
- IPAddress Returns a IPAddress
-
getServerIpv6
IPV6Address getServerIpv6()Information provided by the PKI file:
\brief Returns the IPv6 address of the DNS server. \return ipv6, the DNS server ipv6 address.- Returns:
- IPV6Address Returns a IPV6Address
-
setServerIpv6
Information provided by the PKI file:
\brief Sets the IPv6 address of the DNS server. \param ipAddress, the DNS server IPv6 address.- Parameters:
ipAddress- Takes in a parameter of ipAddress
-
setEnabled
void setEnabled(boolean bEnable) Information provided by the PKI file:
\brief Enable or disable Dns Client Process \param bEnable, true to enable, otherwise false.- Parameters:
bEnable- Takes in a parameter of bEnable
-
isEnabled
boolean isEnabled()Information provided by the PKI file:
\brief Returns true if this DNS client process is enabled, otherwise false. \return bool, true if this DNS client process is enabled, otherwise false.- Returns:
- boolean Returns a boolean
-
getStrToIpCount
int getStrToIpCount()Information provided by the PKI file:
\brief Returns the number of DNS entries in the DNS table. \return int, the number of DNS entries in the DNS table.- Returns:
- int Returns a int
-
getHostAt
Information provided by the PKI file:
\brief Returns the hostname at the specified index. \param index, the index of the hostname of interest. \return string, the hostname at the specified index.- Parameters:
index- Takes in a parameter of index- Returns:
- String Returns a String
-
isHostNameExisted
Information provided by the PKI file:
\brief Returns true if the hostname exists in the DNS table, otherwise false. \param hostname, the hostname of interest. \return bool, true if the hostname exists in the DNS table, otherwise false.- Parameters:
hostname- Takes in a parameter of hostname- Returns:
- boolean Returns a boolean
-
isIpExisted
Information provided by the PKI file:
\brief Returns true if the hostname and IP address DNS entry exists, otherwise false. \param hostname, the hostname to lookup. \param ipAddress, the IP address to lookup. \return bool, true if the hostname and IP address entry exists, otherwise false.- Parameters:
hostname- Takes in a parameter of hostnameipAddress- Takes in a parameter of ipAddress- Returns:
- boolean Returns a boolean
-
getIpOfHost
Information provided by the PKI file:
\brief Returns a list of IP addresses associated with the specified hostname. \param hostname, the hostname of interest. \return vector<ip>, the list of IP addresses associated with the specified hostname.- Parameters:
hostname- Takes in a parameter of hostname- Returns:
- List<IPAddress> Returns a List<IPAddress>
-